from django.shortcuts import render
<<<<<<< HEAD
from rest_framework.generics import ListAPIView,RetrieveAPIView
from . models import Activity
from rest_framework import serializers

# Create your views here.

class ActivityListSerializer(serializers.ModelSerializer):
    class Meta :
        model = Activity
        fields = [ "id","name","cover","city","start_time","status",]
=======
from rest_framework.generics import ListAPIView, RetrieveAPIView
from .models import Activity
from rest_framework import serializers


# Create your views here.

class ActivityListSerializer(serializers.ModelSerializer):
    class Meta:
        model = Activity
        fields = ["id", "name", "cover", "city", "start_time", "status", ]

>>>>>>> c0e411a615cc06dcd36e049646153479c83a5e37

class AcitivityListView(ListAPIView):
    serializer_class = ActivityListSerializer
    queryset = Activity.objects.all()


class ActivityDetailSerializer(serializers.ModelSerializer):
<<<<<<< HEAD
    class Meta :
        model = Activity
        fields = "__all__"

class AcitivityDetailView(RetrieveAPIView):
    serializer_class = ActivityDetailSerializer
    queryset = Activity.objects.all()

=======
    class Meta:
        model = Activity
        fields = "__all__"


class AcitivityDetailView(RetrieveAPIView):
    serializer_class = ActivityDetailSerializer
    queryset = Activity.objects.all()
>>>>>>> c0e411a615cc06dcd36e049646153479c83a5e37
